import { API, requests } from "../../api";
import router from "../../router/index";

const actions = {
    loginAction({ commit }: any, params: unknown) {
        requests({ url: API.user.login, data: params }).then((res:any) => {
            sessionStorage.setItem("token",res.result.token);
            router.push("/Main");
        });
    },
};

export default {
    namespaced: true,
    actions,
};
